﻿<div class="top-row pl-4 navbar navbar-dark">
    <a class="navbar-brand" href="">Blazor Wasm</a>
    <button class="navbar-toggler" @onclick=@ToggleNavMenu>
        <span class="navbar-toggler-icon"></span>
    </button>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
    <ul class="nav flex-column">
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="" Match=NavLinkMatch.All>
                <span class="oi oi-home" aria-hidden="true"></span> Home
            </NavLink>
            <NavLink class="nav-link" href="sync">
                <span class="oi oi-bolt" aria-hidden="true"></span> Non Async
            </NavLink>
        </li>
    </ul>
</div>

@code {
    private bool _collapseNavMenu = true;

    private string? NavMenuCssClass 
        => _collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu() 
        => _collapseNavMenu = !_collapseNavMenu;
}
